import java.util.ArrayList;
import java.util.Enumeration;

public class Test {
    public static void main(String[] args) {
        ArrayList<Integer> arrayList = new ArrayList<>();
        arrayList.add(1);
        arrayList.add(10);
        arrayList.add(5);
        Enumeration enumeration = new IteratorEnumeration(arrayList.iterator());
        while (enumeration.hasMoreElements()) {
            Integer integer = (Integer) enumeration.nextElement();
            System.out.println(integer);
        }
    }
}
